import request from '@/utils/request'
import md5 from 'md5'

export function loginByUsername(account, password) {
  const data = {
    account: account,
    password: md5(password)
  }
  return request({
    url: '/login/easyLoginGetToken',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/login/logout',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/login/getUserInfo',
    method: 'post',
    params: { token }
  })
}

